inputFile = "input.txt";
firstParamFile = "firstParam.txt";
secondParamFile = "secondParam.txt";

firstParamFileId = fopen (firstParamFile, "r");
secondParamFileId = fopen (secondParamFile, "r");


data = dlmread (inputFile, ",");

firstParam = fgetl(firstParamFileId);
secondParam = fgetl(secondParamFileId);

data=rot90(data);

filename = "output.txt";
fid = fopen (filename, "w");


fprintf(fid, "%i,", data);
fprintf(fid, "%s,", firstParam);
fprintf(fid, "%s", secondParam);
fclose (fid);
fclose(firstParamFileId);
fclose(secondParamFileId);